{% extends 'base.html' %}
{% block styles %}
    {{ super() }}
    <style>
    .lh{
        height: 30px;
    }
    </style>
{% endblock %}
{% block container %}
<table  align="center" cellspacing="0" cellpadding="0" width="800px">
<tr >
    <td colspan="2" align="center"><h1 style="color: red">订单详细信息</h1></td>
</tr>
<tr style="height: 20px">
    <td colspan="2"></td>
</tr>
<tr class="lh">
    <td>用户名:{{ session['uname'] }}</td>
    <td>订单号：<span style="color: red">{{ session['order_number'] }}请记住你的订单号</span></td>
</tr>
<tr class="lh">
    <td>订单人的email:{{session['pay_email']  }}</td>
    <td>订单时间:{{ session['o_time'] }}</td>
</tr>
<tr class="lh">
    <td colspan="2">订单人的地址:{{ session['pay_address'] }}</td>
</tr>
<tr class="lh">
    <td colspan="2">付款方式:{{ session['pay_fangshi'] }}</td>
</tr>
<tr style="height: 20px">
    <td colspan="2"></td>
</tr>
<tr>
    <td colspan="2">
        <table  width="95%" class="shopcar">
        <tr>
            <th>购物编号</th>
            <th>会员名</th>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>单价</th>
             <th>数量</th>
            <th>金额</th>

        </tr>
    {% for p,s in shops %}
    <tr>
        <td>{{ s.id }}</td>
        <td>{{ s.username }}</td>
        <td>{{ p.pid }}</td>
        <td>{{ p.pname }}</td>
        <td>{{ p.price }}</td>
        <td>{{ s.pnum1 }}</td>
        <td>{{ p.price*s.pnum1 }}</td>
    </tr>
    {% endfor %}
    <tr>
        <td colspan="8">总金额为：{{ sum }}</td>
    </tr>
    </table>
    </td>
</tr>
<tr>
    <td colspan="2" align="center"><input type="button" value="确定订购" onclick="location.href='/order2'">
        &nbsp;&nbsp;<input type="button" value="取消订购" onclick="history.go(-1);"></td>
</tr>
</table>
{% endblock %}